package softstarter.filehandling.oldfileremover;

import java.io.File;
import java.util.Iterator;
import java.util.List;

import softstarter.launching.RunnableItem;


public class OldFileRemover {
	
	public void removeOldFilesFrom(List<RunnableItem> items) {
		for(Iterator<RunnableItem> iterator = items.iterator(); iterator.hasNext();) {
			File item = new File(iterator.next().getFullPath());
			if(! item.exists())
				iterator.remove();
		}
	}

}
